home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / gui / MR_Classes.lha / MR_Classes / Dev / AutoDocs / tcpalette_gc.doc < prev   
Encoding:
Text File  |  2000-09-05  |  6.5 KB  |  197 lines

  1. TABLE OF CONTENTS
  2.  
  3. /
  4. tcpalette.gc/--datasheet--
  5. /                                                                           /
  6.  
  7.    To Do
  8.        * Add TCPALETTE_PenNameArray (UBYTE **) Make paletter gadget look
  9.          like gadget in Palette Prefs
  10.            May need scroller ?
  11.    44.1 -
  12.        Inlcuded version string
  13.    44.2
  14.        Included file was missing TCPEM_SPREAD, 
  15.        courtesy of the buggy SAS/C editor.
  16.    44.3
  17.        Menu down clears edit mode (copy/spread/swap)
  18.  
  19. tcpalette.gc/--datasheet--                         tcpalette.gc/--datasheet--
  20.  
  21.    NAME
  22.        tcpalette.gadget -- True color palette BOOPSI gadget
  23.  
  24.    SUPERCLASS
  25.        gadgetclass
  26.  
  27.    REQUIRES
  28.        mlr_ordered.pattern
  29.        bevel.image
  30.  
  31.    DESCRIPTION
  32.        This class provides a gadget similar to the palette.gadget
  33.        and the GadTools palette gadget.  Key difference is that
  34.        this gadget provides more than just a "pick a color" user interface.
  35.        Instead of suppling a pen index, this gadget requires color values
  36.        This gadget also provides tags that make it easy to change the 
  37.        colors of the palette and integrate this object with other 
  38.        gadgets using a model.
  39.  
  40.    METHODS
  41.  
  42.        OM_NEW -- Create the palette gadget, calls OM_SET.  Passed to
  43.            superclass.
  44.  
  45.        OM_SET -- Set object attributes.  Passed to superclass first.
  46.  
  47.        OM_GET -- Get object attributes.
  48.  
  49.        OM_NOTIFY -- Notify connections of attribute changes.
  50.  
  51.        OM_DISPOSE -- Frees resources and calls superclass.
  52.  
  53.        OM_UPDATE -- Calls OM_SET.
  54.  
  55.        GM_DOMAIN -- Return the maximum and minimum size of the gadget.
  56.  
  57.        GM_RENDER -- Renders the gadget imagry.  Overrides the superclass.
  58.  
  59.        GM_GOACTIVE -- Activate the gadget on mouse click only.  Overrides
  60.            the superclass.
  61.  
  62.        GM_HANDLEINPUT -- Handles input events once active.  Overrides the
  63.            superclass.
  64.  
  65.        GM_GOINACTIVE -- Deactivates the gadget.  Passed to the superclass.
  66.  
  67.        GM_LAYOUT -- On initial layout, this object sends out OM_NOTIFY
  68.  
  69.        All other methods are passed to the superclass.
  70.  
  71.  
  72.    ATTRIBUTES
  73.        TCPALETTE_ShowSelected (BOOL)
  74.            Keeps the selected pen highlighted when user input ends.
  75.  
  76.            Defaults to TRUE
  77.  
  78.            Applicability is (OM_NEW, OM_SET, OM_GET)
  79.  
  80.        TCPALETTE_SelectedColor (UBYTE) [0..255]
  81.            Selected color
  82.  
  83.            Defaults to 0
  84.  
  85.            Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET, OM_NOTIFY)
  86.  
  87.        TCPALETTE_SelectedRGB (struct TCPaletteRGB *)
  88.            32bit per component, Red, Green & Blue value of the selected color
  89. .
  90.  
  91.            Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET, OM_NOTIFY)
  92.  
  93.        TCPALETTE_SelectedLRGB (struct TCPaletteLRGB *)
  94.            8bit  per component Red, Green & Blue value of the selected color.
  95.            This color format is packed into a ULONG in this format 0x00rrggbb
  96.  
  97.            Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET, OM_NOTIFY)
  98.  
  99.        TCPALETTE_Precision (ULONG) [1..32]
  100.            Bit depth of component colors, only effects the values of the 
  101.            following three tags.  This was implemented because some gadgets
  102.            cannot handle full 32bit numbers, specifically the slider.gadget.
  103.  
  104.            Defaults to 8
  105.  
  106.            Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET, OM_NOTIFY)
  107.    
  108.        TCPALETTE_SelectedRed (ULONG)
  109.        TCPALETTE_SelectedGreen (ULONG)
  110.        TCPALETTE_SelectedBlue (ULONG)
  111.            Component level of the selected color.  The value of these 
  112.            attributes is dependant on the TCPALETTE_Precision attribute.
  113.            Setting TCPALETTE_Precision to 8, will yield a range from 0-255;
  114.            4 = 0-15
  115.  
  116.            Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET, OM_NOTIFY)
  117.  
  118.        TCPALETTE_NumColors (ULONG) [1..256]
  119.            Number of colors in the palette.
  120.  
  121.            Defaults to 1
  122.  
  123.            Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET, OM_NOTIFY)
  124.  
  125.        TCPALETTE_RGBPalette (struct TCPaletteRGB *)
  126.            Palette data, you provide an array, with at leaset
  127.            TCPALETTE_NumColors entries.  If your array is to
  128.            small, bad things will happen (especially with OM_GET).
  129.  
  130.            Defaults to all entries 0,0,0
  131.  
  132.            Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET)
  133.  
  134.        TCPALETTE_LRGBPalette (struct TCPaletteLRGB * or ULONG *)
  135.            Palette data, you provide an array, with at leaset
  136.            TCPALETTE_NumColors entries.  If your array is to
  137.            small, bad things will happen (especially with OM_GET).
  138.  
  139.            Defaults to all entries 0
  140.  
  141.            Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET)
  142.  
  143.        TCPALETTE_Orientation
  144.            Restrict layout to horizontal or vertical.
  145.            Not yet implemented.
  146.  
  147.        TCPALETTE_EditMode (ULONG)
  148.            TCPEM_NORMAL - 
  149.            TCPEM_COPY - The color of the current selected pen will
  150.              be copied to the pen the user selects next.
  151.            TCPEM_SWAP - The color of the current selected pen will
  152.              be swaped with the pen the user selects next.
  153.            TCPEN_SPREAD - The color of the current selected pen will
  154.              be spread to the pen the user selects next.
  155.  
  156.            Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET, OM_NOTIFY)
  157.  
  158.        TCPALETTE_Undo 
  159.            Undo changes to palette, this should be a method.
  160.            
  161.            Applicability is (OM_SET, OM_UPDATE)
  162.  
  163.        TCPALETTE_NoUndo 
  164.            If zero the undo buffer has data in it.
  165.            (so it's mappable to GA_Disabled, ie. disable UNDO gadget)
  166.  
  167.            Applicability is (OM_GET, OM_NOTIFY)
  168.  
  169.    NOTIFICATION
  170.        These tags are supplied during notification.
  171.        TCPALETTE_SelectedColor (UBYTE) [0..255]
  172.        TCPALETTE_SelectedRGB (struct TCPaletteRGB *)
  173.        TCPALETTE_SelectedLRGB (struct TCPaletteRGB *)
  174.        TCPALETTE_SelectedRed (ULONG)
  175.        TCPALETTE_SelectedGreen (ULONG)
  176.        TCPALETTE_SelectedBlue (ULONG)
  177.        TCPALETTE_NumColors (ULONG) [1..256]
  178.        TCPALETTE_EditMode
  179.        TCPALETTE_NoUndo (ULONG)
  180.  
  181.    NOTES
  182.        On true color CyberGfx displays, this gadgets renders true colors.
  183.        On 8bit or less displays, this gadget uses FindColor() to display
  184.        colors, which means that the gadget may become visually corrupt
  185.        when other programs change the screen colors.  So you may what to
  186.        rerender the object periodically.
  187.  
  188.  
  189.    BUGS
  190.        Gadget may become visually corrupt when screen colors change on
  191.        8 bit or less screens.
  192.  
  193.        Xen Bevel is rendered wrong.  Bevel docs to vague.
  194.  
  195.    SEE ALSO
  196.  
  197.